package com.jblapp.icu.http;

import java.util.List;

import org.apache.http.NameValuePair;
import org.json.JSONObject;

public class UniqId extends AbstractHttpRequest {
	private List<NameValuePair> params=null;
	private final static String url="http://icu.joblean.com.cn/user.php?action=getuniqid";
	public UniqId(List<NameValuePair> params) {
		this.params = params;
	}

	/**
	 * @param jsonMsg
	 *            The json object string that need to parse
	 */
	@Override
	public Object parse(String jsonMsg) throws Exception {
		JSONObject json = new JSONObject(jsonMsg);
		return json.get("uniqid");
	}

	public String getUnitId() throws Exception {
		return (String)this.httpPostMethod(url, params);
	}
}
